package controller;

import dao.HelloDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 模拟一个表现层，用于调用业务层
 */
public class MyController {

    public static void main(String[] args) {
        //1.获取Spring核心容器对象,加载xml
        ApplicationContext cxac = new ClassPathXmlApplicationContext("bean.xml");
        HelloDao helloDao = cxac.getBean("helloDao", HelloDao.class);
        helloDao.welcome();
    }

}
